Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

google-p12-pem

Package Overview
Dependencies
Maintainers
4
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-p12-pem

Convert Google .p12 keys to .pem keys.

  • 4.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.8M
decreased by-27.12%
Maintainers
4
Weekly downloads
 
Created

What is google-p12-pem?

The google-p12-pem npm package is used to convert Google .p12 or PFX files to the PEM format. This is particularly useful when dealing with authentication in Google Cloud Platform services, as it allows developers to transform the private key obtained from Google into a format that can be used with various authentication libraries.

What are google-p12-pem's main functionalities?

Convert P12 to PEM

This feature allows you to convert a .p12 or PFX file to PEM format. The code sample demonstrates how to use the `getPem` function provided by the package to perform the conversion. The function takes the path to the .p12 file and a callback function that receives an error or the resulting PEM.

const { getPem } = require('google-p12-pem');
getPem('/path/to/key.p12', (err, pem) => {
  if (err) {
    console.error('Error converting P12 to PEM', err);
    return;
  }
  console.log(pem);
});

Convert P12 to PEM with Promise

This feature is similar to the previous one but uses Promises instead of callbacks. It allows for better integration with modern asynchronous JavaScript code, such as async/await syntax.

const { getPem } = require('google-p12-pem');
getPem('/path/to/key.p12').then(pem => {
  console.log(pem);
}).catch(err => {
  console.error('Error converting P12 to PEM', err);
});

Other packages similar to google-p12-pem

FAQs

Package last updated on 26 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc